package cn.gson.crm.model.pojo;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * The persistent class for the DETAIL_REPAIR database table.
 * 
 */
@Entity
@Table(name="DETAIL_REPAIR")
@NamedQuery(name="DetailRepair.findAll", query="SELECT d FROM DetailRepair d")
public class DetailRepair implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="DETAIL_REPAIR_DRID_GENERATOR", sequenceName="SEQ_21")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="DETAIL_REPAIR_DRID_GENERATOR")
	@Column(name="DR_ID")
	private long drId;

	@Column(name="CONNECTOR_STATE")
	private String connectorState;

	@Column(name="DR_ATTENTION")
	private String drAttention;

	@Temporal(TemporalType.DATE)
	@Column(name="DR_DELIVER_DATE")
	private Date drDeliverDate;

	@Column(name="DR_DEPT_ID")
	private BigDecimal drDeptId;

	@Column(name="DR_DEPT_NAME")
	private String drDeptName;

	@Column(name="DR_FEE")
	private BigDecimal drFee;

	@Column(name="DR_GUARANTEE")
	private BigDecimal drGuarantee;

	@Column(name="DR_HITCH_DESCRIBLE")
	private String drHitchDescrible;

	@Column(name="DR_PRODUCT")
	private String drProduct;

	@Temporal(TemporalType.DATE)
	@Column(name="DR_PRODUCT_DATE")
	private Date drProductDate;

	@Temporal(TemporalType.DATE)
	@Column(name="DR_PRODUCT_SALE")
	private Date drProductSale;

	@Column(name="DR_PRODUCT_SEQU")
	private String drProductSequ;

	@Column(name="DR_PROFIT")
	private BigDecimal drProfit;

	@Column(name="DR_RECIVE_FEE")
	private BigDecimal drReciveFee;

	@Column(name="DR_REMARKS")
	private String drRemarks;

	@Column(name="DR_SPEED_PROGRESS")
	private String drSpeedProgress;

	@Column(name="DR_STATE")
	private BigDecimal drState;

	//bi-directional many-to-one association to ConnectorState
	@ManyToOne
	@JoinColumn(name="CONNECTOR_STATE_ID")
	private ConnectorState connectorStateBean;

	//bi-directional many-to-one association to Repair
	@ManyToOne
	@JoinColumn(name="REPAIR_ID")
	private Repair repair;

	//bi-directional many-to-one association to Repair
	@OneToMany(mappedBy="detailRepair")
	private List<Repair> repairs;

	//bi-directional many-to-one association to RepairPart
	@OneToMany(mappedBy="detailRepair")
	private List<RepairPart> repairParts;

	public DetailRepair() {
	}

	public long getDrId() {
		return this.drId;
	}

	public void setDrId(long drId) {
		this.drId = drId;
	}

	public String getConnectorState() {
		return this.connectorState;
	}

	public void setConnectorState(String connectorState) {
		this.connectorState = connectorState;
	}

	public String getDrAttention() {
		return this.drAttention;
	}

	public void setDrAttention(String drAttention) {
		this.drAttention = drAttention;
	}

	public Date getDrDeliverDate() {
		return this.drDeliverDate;
	}

	public void setDrDeliverDate(Date drDeliverDate) {
		this.drDeliverDate = drDeliverDate;
	}

	public BigDecimal getDrDeptId() {
		return this.drDeptId;
	}

	public void setDrDeptId(BigDecimal drDeptId) {
		this.drDeptId = drDeptId;
	}

	public String getDrDeptName() {
		return this.drDeptName;
	}

	public void setDrDeptName(String drDeptName) {
		this.drDeptName = drDeptName;
	}

	public BigDecimal getDrFee() {
		return this.drFee;
	}

	public void setDrFee(BigDecimal drFee) {
		this.drFee = drFee;
	}

	public BigDecimal getDrGuarantee() {
		return this.drGuarantee;
	}

	public void setDrGuarantee(BigDecimal drGuarantee) {
		this.drGuarantee = drGuarantee;
	}

	public String getDrHitchDescrible() {
		return this.drHitchDescrible;
	}

	public void setDrHitchDescrible(String drHitchDescrible) {
		this.drHitchDescrible = drHitchDescrible;
	}

	public String getDrProduct() {
		return this.drProduct;
	}

	public void setDrProduct(String drProduct) {
		this.drProduct = drProduct;
	}

	public Date getDrProductDate() {
		return this.drProductDate;
	}

	public void setDrProductDate(Date drProductDate) {
		this.drProductDate = drProductDate;
	}

	public Date getDrProductSale() {
		return this.drProductSale;
	}

	public void setDrProductSale(Date drProductSale) {
		this.drProductSale = drProductSale;
	}

	public String getDrProductSequ() {
		return this.drProductSequ;
	}

	public void setDrProductSequ(String drProductSequ) {
		this.drProductSequ = drProductSequ;
	}

	public BigDecimal getDrProfit() {
		return this.drProfit;
	}

	public void setDrProfit(BigDecimal drProfit) {
		this.drProfit = drProfit;
	}

	public BigDecimal getDrReciveFee() {
		return this.drReciveFee;
	}

	public void setDrReciveFee(BigDecimal drReciveFee) {
		this.drReciveFee = drReciveFee;
	}

	public String getDrRemarks() {
		return this.drRemarks;
	}

	public void setDrRemarks(String drRemarks) {
		this.drRemarks = drRemarks;
	}

	public String getDrSpeedProgress() {
		return this.drSpeedProgress;
	}

	public void setDrSpeedProgress(String drSpeedProgress) {
		this.drSpeedProgress = drSpeedProgress;
	}

	public BigDecimal getDrState() {
		return this.drState;
	}

	public void setDrState(BigDecimal drState) {
		this.drState = drState;
	}

	public ConnectorState getConnectorStateBean() {
		return this.connectorStateBean;
	}

	public void setConnectorStateBean(ConnectorState connectorStateBean) {
		this.connectorStateBean = connectorStateBean;
	}

	public Repair getRepair() {
		return this.repair;
	}

	public void setRepair(Repair repair) {
		this.repair = repair;
	}

	public List<Repair> getRepairs() {
		return this.repairs;
	}

	public void setRepairs(List<Repair> repairs) {
		this.repairs = repairs;
	}

	public Repair addRepair(Repair repair) {
		getRepairs().add(repair);
		repair.setDetailRepair(this);

		return repair;
	}

	public Repair removeRepair(Repair repair) {
		getRepairs().remove(repair);
		repair.setDetailRepair(null);

		return repair;
	}

	public List<RepairPart> getRepairParts() {
		return this.repairParts;
	}

	public void setRepairParts(List<RepairPart> repairParts) {
		this.repairParts = repairParts;
	}

	public RepairPart addRepairPart(RepairPart repairPart) {
		getRepairParts().add(repairPart);
		repairPart.setDetailRepair(this);

		return repairPart;
	}

	public RepairPart removeRepairPart(RepairPart repairPart) {
		getRepairParts().remove(repairPart);
		repairPart.setDetailRepair(null);

		return repairPart;
	}

}